package com.yjc.drygoods.ware.entity;

import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;

import java.math.BigDecimal;
import java.io.Serializable;
import java.util.Date;
import java.util.List;

import com.fasterxml.jackson.annotation.JsonFormat;
import lombok.Data;
import lombok.ToString;

/**
 * @author yjc
 * @email yjc19979401754@126.com
 * @date 2022-08-19 23:23:36
 */
@ToString
@Data
@TableName("wms_purchase_detail")
public class PurchaseDetailEntity implements Serializable {
    private static final long serialVersionUID = 1L;

    /**
     *
     */
    @TableId
    private Long id;
    /**
     * 采购单id
     */
    private Long purchaseId;
    /**
     * 采购干货id
     */
    private Long spuId;
    /**
     * 采购干货名称
     */
    private String spuName;
    /**
     * 采购数量
     */
    private Double spuNum;
    /**
     * 批次
     */
    private Integer batch;
    /**
     * 采购总金额
     */
    private BigDecimal spuPrice;
    /**
     * 单个采购金额
     */
    private BigDecimal singleSpuPrice;
    /**
     * 仓库id
     */
    private Long wareId;
    /**
     * 状态[0新建，1已分配，2正在采购，3已完成，4采购失败]
     */
    private Integer status;
    /**
     * 供应商id
     */
    private Long supplierId=1L;
    /**
     * 供应商名称
     */
    private String supplierName;
    /**
     * 更新时间
     */
    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8")
    private Date updateTime;

    /**
     * 仓库名称
     */
    private String wareName;
    /**
     * 失败原因
     */
    private String reason;

    /**
     * 完整三级路径和对应的spu
     */
    @TableField(exist = false)
    private Long[] catelogPathWithSpu;

}
